package com.cykj.eurekaribbon.controller;

import com.cykj.eurekaribbon.bean.CityInfo;
import com.cykj.eurekaribbon.bean.StationInfo;
import com.cykj.eurekaribbon.service.StationInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class StationInfoController {

    @Autowired
    StationInfoService stationInfoService;

    /**
     * @version 1.0
     * @author: zhiMing
     * @date: 2021/9/23 1:00
     * @desc: 控制层，根据地区，获取对应的站点集合
     */
    @RequestMapping("getStationList")
    public CityInfo getStationList(@RequestBody Map<String,String> data){
        String district = data.get("district");
        System.out.println(district);
        return stationInfoService.getStationList(district);
    }
}
